<link rel="stylesheet" type="text/css" href="<?=n_css('nlog','nlog')?>">
<div class="n-row search_nlog">
	<form method="get" action="<?=n_url('nlog', 'error')?>">
		<input readonly class="n-calendar n-col-2 search_nlog_input" name="time" type="text" value=<?=isset($data['time'])?$data['time']:date('Y-m-d')?>>
		<div class="n-col-2">
			<input name="plugin" type="text" <?php if(isset($data['plugin']) || $param['plugin'] != '') echo "value=".$data['plugin']; else echo "placeholder=插件名称"?>>
		</div>
		<div class="n-col-2">
			<input name="scode" type="text" placeholder="scode"/>
		</div>
		<div class="n-col-2">
			<button class="a-button-blue">查询</button>
		</div>
		<div class="n-col-2">
			<!--<input name="type" type="text" placeholder="日志类型"/>-->
		</div>
		<div class="n-col-2">
			<!--<input name="utype" type="text" placeholder="自定义错误类型"/>-->
		</div>
	</form>
</div>
<div class="search-error-content">
<?php $nsite = n_api('nsite');?>
<?php foreach($data['data'] as $value):?>
<div class="a-panel a-panel-default">
     <div class="a-panel-head">
     	<div class="n-row">
     		<div class="n-col-6 n-nopadding">Time:&nbsp;&nbsp;&nbsp;<?=date('Y-m-d H:i:s',$value['time'])?></div>
     		<div class="n-col-6 n-nopadding">Plugin:&nbsp;&nbsp;&nbsp;<?=$value['plugin']?></div>
     	</div>
     	<div class="n-row">
     		<div class="n-col-6 n-nopadding">Scode:&nbsp;&nbsp;&nbsp;
     		<?php
				try{
					$rs = $nsite->getByScode($value['scode']);
					echo $rs['name'] . " ({$value['scode']})";
				}catch(exception $e){
					echo $value['scode'];
				}
			?>	
     		</div>
     		<div class="n-col-6 n-nopadding">Utype:&nbsp;&nbsp;&nbsp;<?=$value['utype']?></div>
     	</div>
     </div>
     <div class="a-panel-body">
     	<?php foreach ($value['content'] as $key => $value):?>
     	<div class="n-row">
     		<?=$key?>:&nbsp;&nbsp;&nbsp;<?=$value?>
     	</div>
     	<?php endforeach;?>
     </div>
</div>
<?php endforeach;?>
</div>
<div class="n-paging"><?=$data['paging']?></div>